Conversation
There was a problem hiding this comment.
do not copy paste, this should be pre-deployed and referenced in the AIP directly
There was a problem hiding this comment.
yeah maybe a todo to rm these local deps once the pr is merged into v4. Anyway we wouldnt need IAccessManager and IHub to be local deps given that you're updating the remappings to use v4 deps?
There was a problem hiding this comment.
let's ref the specific aave-v4 branch for now so we can remove this and have correct dependencies then, it will be easier to clean up once the PR is merged there.
| import {CollectorUtils, ICollector} from 'aave-helpers/src/CollectorUtils.sol'; | ||
|
|
||
| import {IAaveCLRobotOperator} from 'src/interfaces/IAaveCLRobotOperator.sol'; | ||
| import {FeeSharesMinterBase} from './dependencies/FeeSharesMinterBase.sol'; |
There was a problem hiding this comment.
let's have consistent import patterns
| using SafeERC20 for IERC20; | ||
| using CollectorUtils for ICollector; | ||
|
|
||
| uint96 public constant LINK_AMOUNT = 200 ether; |
There was a problem hiding this comment.
prefer not to use ether units for non ethereum assets (just imo)
There was a problem hiding this comment.
also wondering on general costs, how long 200e18 worth of LINK will last here
There was a problem hiding this comment.
I think the amount should be enough to start with, should last quite a while, as the actions are not that gas expensive. But would be good to have a real estimate ofc, depending on the number of reserves to cover.
There was a problem hiding this comment.
if doing local deps, could just move this into the dependencies/ dir in this AIP folder
|
|
||
| import {IAaveCLRobotOperator} from 'src/interfaces/IAaveCLRobotOperator.sol'; | ||
| import {IFeeSharesMinterBase} from 'src/interfaces/IFeeSharesMinterBase.sol'; | ||
| import {AaveV4Ethereum_RegisterFeeSharesMinterKeeper_20260409} from './AaveV4Ethereum_RegisterFeeSharesMinterKeeper_20260409.sol'; |
|
|
||
| ## Specification | ||
|
|
||
| - Deploy the FeeSharesMinterBase contract owned by the governance executor |
There was a problem hiding this comment.
above it is mentioned as being pre-deployed prior to this aip?
| uint256 accruedFees = hubContract.getAssetAccruedFees(assetId); | ||
| uint256 totalAddedAssets = hubContract.getAddedAssets(assetId); | ||
|
|
||
| if ((accruedFees * PERCENTAGE_FACTOR) / totalAddedAssets < minAccruedFeesPercent) { |
There was a problem hiding this comment.
is this on an old version of the fee minter? this is percentMul there i see
| address minterAddress = _getMinterAddressFromLogs(logs); | ||
| IFeeSharesMinterBase minter = IFeeSharesMinterBase(minterAddress); | ||
| IHub hub = AaveV4EthereumHubs.CORE_HUB; | ||
| uint256 assetId = 0; |
There was a problem hiding this comment.
I don't know if I'm comfortable with us only testing 1 specific asset one Core Hub, I'd prefer we have multiple scenarios, especially since the FeeSharesMinter is fully based on amounts now.
There was a problem hiding this comment.
agree, esp with high/low decimals and value
|
|
||
| function execute() external { | ||
| // TODO: Replace this deployment with the pre-deployed address once available. | ||
| address feeSharesMinter = address(new FeeSharesMinterBase(GovernanceV3Ethereum.EXECUTOR_LVL_1)); |
There was a problem hiding this comment.
rm please, let's have it deployed with the Deploy Engine in aave-v4 and set as a constant here.
There was a problem hiding this comment.
todo: add this to deploy engine for me
| uint256 withdrawnBalance = AaveV3Ethereum.COLLECTOR.withdrawFromV3( | ||
| CollectorUtils.IOInput({ | ||
| pool: address(AaveV3Ethereum.POOL), | ||
| underlying: AaveV3EthereumAssets.LINK_UNDERLYING, | ||
| amount: LINK_AMOUNT | ||
| }), | ||
| address(this) | ||
| ); | ||
| IERC20(AaveV3EthereumAssets.LINK_UNDERLYING).forceApprove( | ||
| MiscEthereum.AAVE_CL_ROBOT_OPERATOR, | ||
| withdrawnBalance | ||
| ); |
There was a problem hiding this comment.
let's put this in the pre hook
No description provided.